// 获得字符串日期2019-12-01
export function getStringDate(thedate) {
  const d = new Date(thedate);
  let a = '';
  if (d.getDate() < 10) {
    a = `0${d.getDate()}`;
  } else {
    a = d.getDate();
  }
  let month = d.getMonth() + 1;
  if (month < 10) {
    month = `0${month}`;
  }
  const datetime = `${d.getFullYear()}-${month}-${a}`;

  return datetime;
}
